package com.chj.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.chj.entity.NetWork;
import com.chj.util.ResultSetUtil;
import com.etc.jdbc.mapper.RowMapper;

public class NetWorkMapper implements RowMapper<NetWork>{

    @Override
    public NetWork mapRow(ResultSet rs) throws SQLException {

        NetWork netWork = new NetWork();

        netWork.setNetworkId(ResultSetUtil.getString(rs, "network_id"));//network_id
        netWork.setNetworkName(ResultSetUtil.getString(rs, "network_name"));//network_name
        netWork.setNetworkParkSize(ResultSetUtil.getInt(rs, "network_park_size"));//network_park_size
        netWork.setNetworkProvince(ResultSetUtil.getString(rs, "network_province"));//network_province
        netWork.setNetworkCity(ResultSetUtil.getString(rs, "network_city"));//network_city
        netWork.setNetworkArea(ResultSetUtil.getString(rs, "network_area"));//network_area
        netWork.setNetworkAddress(ResultSetUtil.getString(rs, "network_address"));//network_address
        netWork.setNetworkPrice(ResultSetUtil.getBigDecimal(rs, "network_price"));//network_price
        netWork.setNetworkTimeBegin(ResultSetUtil.getString(rs, "network_time_begin"));//network_time_begin
        netWork.setNetworkTimeEnd(ResultSetUtil.getString(rs, "network_time_end"));//network_time_end
        netWork.setNetworkType(ResultSetUtil.getInt(rs, "network_type"));//network_type
        netWork.setCreateDate(ResultSetUtil.getDateTime(rs, "create_date"));//create_date
        netWork.setModifyDate(ResultSetUtil.getDateTime(rs, "modify_date"));//modify_date
        netWork.setDeleteDate(ResultSetUtil.getDateTime(rs, "delete_date"));//delete_date
        netWork.setStatus(ResultSetUtil.getInt(rs, "status"));//status

        return netWork;
    }

}
